import { Inject, Controller, Post, Body } from '@midwayjs/decorator';
import { Context } from '@midwayjs/koa'
import { MapService } from '../service/map.service';
// import { UserDTO } from '../dto/jiaoyan';
import { MapDTO } from '../dto/map';


/**
 * 描述
 */
@Controller('/map')
export class APIController {
    @Inject()
    ctx: Context;
    @Inject()
    MapService: MapService;
    @Post('/place/v1/search')
    async search(@Body() Body: MapDTO) {


        return await this.MapService.placeSearch({ keyword: "明德" })
    }
    @Post('/place/v1/getloaction')
    async getloaction(@Body() Body: MapDTO) {
        return await this.MapService.getlocation(Body)
    }


    /**
     * daohang
     */
    @Post('/place/v1/daohang')
    async daohang(@Body() Body: MapDTO) {
        return await this.MapService.todaohang()
    }
    /**
     * daohang
     */
    @Post('/place/v1/truth_analy')
    async truth_analy(@Body() Body: MapDTO) {
        return await this.MapService.truth_analy()
    }


}